import { animated, useSpringValue } from "@react-spring/web";
import { useEffect } from "react";
import './index.css'

export default function SpringTest() {
    const width = useSpringValue(0, {
        config: {
            // duration: 2000,
            mass: 2,
            friction: 10,
            tension: 200
        }
    })

    useEffect(() => {
        width.start(300)
    }, [])

    return <animated.div className="box" style={{width}}></animated.div>
}